<<<<<<< HEAD
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/about",
    name: "About",
    component: () =>
      import( "../views/About.vue")
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
=======
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import About from '../views/About'
import News from '../views/News'
import Lesson from '../views/Lesson'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:'home',
    component: Home,
    // redirect:'/about',//重定向
  },
  {
    path: '/about',
    name:'about',
    component: About,
    alias:'/asd',//别名
  },
  {
    path: '/news',
    name:'news',
    component: News,
  },
  {
    path: '/lesson/:id',
    name:'lesson',
    component: Lesson,
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
>>>>>>> 6bf8714517698cba3c843e451acfb7d17c339c11
